DescribeMetricLast
Description
call the DescribeMetricLast interface to query the latest monitoring data of the specified monitoring object.
Request Method
POST
Request Path
/apsara/route/cms/DescribeMetricLast
Request Parameters Common Parameters
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
MetricName | BODY | string | Yes | CPUUtilization | monitoring item name. |
Express | BODY | string | No | {"groupby":["userId","instanceId"]} | expression for real-time calculation of existing query results. |
EndTime | BODY | string | No | 2019-01-31 10:10:00 | end time. The format is Unix timestamp, which is the number of seconds passed from January 1, 1970. indicates that can only query monitoring data within 270 days. |
NextToken | BODY | string | No | 15761432850009dd70bb64cff1f0fff6c0b08ffff073be5fb1e785e2b020f7fed9b5e137bd810a6d6cff5ae**** | the identity of the paging cursor. If the return result of the matching query condition exceeds the paging size, this paging cursor will be returned. if you need to obtain the next page data, you can use the returned cursor value as the request parameter until no cursor value is returned, indicating that all the result data has been obtained. |
Length | BODY | string | No | 1000 | returns the size of each page of monitoring data for paging query. /p> the default value is 1000, that is, 1000 pieces of monitoring data per page. |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
StartTime | BODY | string | No | 2019-01-31 10:00:00 | start time. The format is Unix timestamp, which is the number of seconds passed from January 1, 1970. description can only query monitoring data within 270 days and the start time and end time do not exceed 31 days. |
Dimensions | BODY | string | No | [{"instanceId":"XXXXXX"}] | dimension map, which is used to query the monitoring data of specified resources. format key-valuekey-value pair A collection of forms, commonly used key-value set as instanceId:XXXXXX. key and value has a length of 1-64 bytes, intercept the first 64 bytes when it exceeds 64 bytes. key and value values can include letters, numbers, dots (.), hyphens (-), underscores (_), forward slashes (/), and backslashes (\). description Dimensions JSON string is required to represent the map object when passing in, which must be passed in in sequence. |
Period | BODY | string | No | 60 | The time interval is usually the reporting period of monitoring items, and the unit is seconds. If you do not fill it in, query the original data according to the reporting cycle stated when registering the monitoring item. if a statistical period is set when setting an alarm rule, the corresponding statistical data will be queried according to this period. |
version | BODY | string | No | 2016-01-01 | version of api |
Namespace | BODY | string | Yes | acs_ecs_dashboard | The data namespace of the product is used to distinguish different products. Naming method: acs_product name. |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
RequestId | string | No sample value for this parameter. | request ID. |
NextToken | string | No sample value for this parameter. | paging cursor ID. |
Message | string | No sample value for this parameter. | error message. |
Period | string | No sample value for this parameter. | time interval, in seconds. |
Datapoints | string | No sample value for this parameter. | monitoring data list. |
Code | string | No sample value for this parameter. | status code. description status code 200 indicates success. |
Success | boolean | No sample value for this parameter. | whether the request was successful. |
Example
Successful Response example
"The successful response sample is not recognizable. Please modify API definition in API gateway before re-create the API document."
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}